package cn.sumpu.app.guoguojie.constant;

import java.util.HashMap;
import java.util.Map;

public enum SchoolType {
	ONE("01", "大学"), TWO("02", "高中"), THREE("03", "职技校"), FOUR("04", "中学"), FIVE("05", "小学");
	private String value;
	private String label;
	
	private static Map<String,String> cache;
	
	static {
		cache = new HashMap<String,String>();
		cache.put(ONE.getValue(), ONE.getLabel());
		cache.put(TWO.getValue(), TWO.getLabel());
		cache.put(THREE.getValue(), THREE.getLabel());
		cache.put(FOUR.getValue(), FOUR.getLabel());
		cache.put(FIVE.getValue(), FIVE.getLabel());
	}

	private SchoolType(String value, String label) {
		this.value = value;
		this.label = label;
	}

	public String getValue() {
		return value;
	}

	public String getLabel() {
		return label;
	}
	
	public static String getLabelByValue(String value) {
		return cache.get(value);
	}
	
}
